package com.eshopkeeper.provider.sys;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.baomidou.mybatisplus.plugins.Page;
import com.eshopkeeper.core.base.BaseProviderImpl;
import com.eshopkeeper.dao.sys.SysParamMapper;
import com.eshopkeeper.model.sys.SysParam;
import com.weibo.api.motan.config.springsupport.annotation.MotanService;

/**
 * @author chenshufeng
 * @version 2017年3月17日31日 上午11:01:33
 */
//@CacheConfig(cacheNames = "sysParam")
@MotanService(basicService = "serviceBasicConfig")
public class SysParamProviderImpl extends BaseProviderImpl<SysParam> implements ISysParamProvider {
	
	@Autowired
    private SysParamMapper sysParamMapper;

	public Page<SysParam> query(Map<String, Object> params) {
        Page<Long> page = this.getPage(params);
        page.setRecords(mapper.selectIdByMap(page, params));
        return getPage(page);
	}

	@Override
	public void insertSysParam(SysParam sysParam) {
		sysParamMapper.insertSysParam(sysParam);
	}

	@Override
	public void updateSysParam(Map<String, Object> paramMap) {
		sysParamMapper.updateSysParam(paramMap);
	}
	
}
